﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;

namespace InstantSpine.Core.MaterialModels
{
    /// <summary>
    /// Defines the behavior of spring elements
    /// </summary>
    [DataContract]
    public sealed class NonlinearSpringBehavior: MaterialViewModel
    {
        [DataMember]
        public ObservableCollection<ForceDeflectionPair> ForceDeflectionCurve { get; private set; }

        public NonlinearSpringBehavior(string name = null): base(name) {
            this.ForceDeflectionCurve = new ObservableCollection<ForceDeflectionPair>();
        }

        public NonlinearSpringBehavior(IEnumerable<ForceDeflectionPair> testdata, string name = null): base(name) {
            this.ForceDeflectionCurve = new ObservableCollection<ForceDeflectionPair>(testdata);
        }

        // required for XML serialization to work
        public NonlinearSpringBehavior() : this(null) { }
    }
}
